Matthew was written by a community living in 85 CE. The writers were telling the members of their community of their expectations in the light of the pressures they were experiencing, particularly at the hands of the Pharisees. Those Pharisees accepted Tradition to be on a par with the written text but the "Matthew" group were very strictly aligned to the letter of the Biblical Law (not a jot or tittle, as the KJV used to say).
The Book of Revelation was composed by a very different group at a different time for a different purpose. It is a highly erotic symbolic flight of fancy. Clearly also very legalistic Jewish in its outlook. It is a compilation of material from the Jewish writings and I suspect that you will gain a far better insight by reading books such as 1 Enoch and Jubilees to determine whether you can locate the source of the particular passage in Revelation you are referring to.
I suspect that the only place where Matthew and Revelation can be compared is with the 5th Discourse, often termed "The Little Apocalypse" (Matt 23ff).
The passage at Matt 7 appears in the First Discourse formulated by the writers of Matthew.
Doug
PS. The words attributed to Jesus are actually the words of the writers placed on his lips.